home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows2 / hp22d3.zip / REFGUIDE / PDTKSCRP.TXT < prev    next >
Text File  |  1991-05-16  |  26KB  |  849 lines

  1.  
  2.  
  3.  
  4.  
  5.      _______________________________________________________________________
  6.                                          Chapter 2: PADtalk Scripts   13
  7.     ________________________________________________________________________
  8.  
  9.  
  10.     CHAPTER TWO: PADTALK SCRIPTS
  11.  
  12.  
  13.     CONSTRUCTING SCRIPTS
  14.  
  15.     In HyperPAD, scripts are written using the Script Editor. In order to
  16.     access an object's script, the pad's user level must be set to
  17.     scripting. (See the section on user levels in the HyperPAD User's Guide
  18.     for additional information.)
  19.  
  20.  
  21.     To access an object's script:
  22.  
  23.     1.  Make sure the pad's user level is set to Scripting.
  24.  
  25.     2.  Select the object with the Selector tool.
  26.  
  27.     In order to access a button or field's script, you must use the Selector
  28.     tool and select the object.
  29.  
  30.     3.  Open the object's Info dialog box from the Objects menu.
  31.  
  32.     Depending on the type of object you are working with, select Pad, Bkgnd,
  33.     Page, Button, or Field Info from the Objects menu.
  34.  
  35.     4.  Select the <Script...> button from the dialog box.
  36.  
  37.     The Script Editor will be loaded along with the object's script.
  38.  
  39.  
  40.  
  41.      _______________________________________________________________________
  42.                                          Chapter 2: PADtalk Scripts   14
  43.     ________________________________________________________________________
  44.  
  45.  
  46.     THE SCRIPT EDITOR
  47.  
  48.     The Script Editor is an environment that allows you to edit an object's
  49.     script and then compile it. It looks like this: 
  50.  
  51.  ┌───────────────────────────────────────────────────────────────────────┐
  52.  │                                                                       │
  53.  │ **** The Printed Documentation has a picture or screen shot here **** │
  54.  │                                                                       │
  55.  └───────────────────────────────────────────────────────────────────────┘
  56.     
  57.  
  58.  
  59.     EXITING THE SCRIPT EDITOR:
  60.  
  61.     To exit the Script Editor and return to the previous screen, use one of
  62.     the following methods:
  63.  
  64.     1.  Press ESC. If you have made any modifications, you will be asked if
  65.     you want to save them.
  66.  
  67.     2.  Select Cancel from the File menu. Any changes you made will be lost.
  68.  
  69.     3.  Select Save and Return from the File menu. This saves any changes
  70.     and then returns to the pad.
  71.  
  72.  
  73.     LET'S START SCRIPTING:
  74.  
  75.     Let's create a very simple script linking a newly created button to the
  76.     Home pad. (If you are going to do the procedures, you should create a
  77.     new pad and a new button.)
  78.  
  79.  
  80.     To create a new pad:
  81.  
  82.     1.  Set the user level to scripting. (See the section on user levels in
  83.     the HyperPAD User's Guide.)
  84.  
  85.  
  86.  
  87.      _______________________________________________________________________
  88.                                          Chapter 2: PADtalk Scripts   15
  89.     ________________________________________________________________________
  90.  
  91.  
  92.     2.  Select the New command from the File menu.
  93.  
  94.     3.  Type in the name of your pad and press ENTER.
  95.  
  96.     A blank page will be placed on-screen.
  97.  
  98.  
  99.     To create a new button:
  100.  
  101.     1.  Set the user level to scripting.
  102.  
  103.     2.  Select the Select tool from the Tools menu.
  104.  
  105.     3.  Select the New Button command from the Objects menu.
  106.  
  107.     A new button will appear on-screen.
  108.  
  109.  
  110.     To go to the button's script:
  111.  
  112.     1.  Select Button Info from the Objects menu (or just press ENTER).
  113.  
  114.     2.  Select the button (or press ALT+S).
  115.  
  116.     First, access the button's script. When the Script Editor loads, you'll
  117.     see that HyperPAD has already written part of the script for you.
  118.     Because almost all buttons created in HyperPAD respond to being
  119.     selected, each button's script, by default, provides an empty select
  120.     handler.
  121.  
  122.  ┌───────────────────────────────────────────────────────────────────────┐
  123.  │                                                                       │
  124.  │ **** The Printed Documentation has a picture or screen shot here **** │
  125.  │                                                                       │
  126.  └───────────────────────────────────────────────────────────────────────┘
  127.     
  128.  
  129.     First, examine the script HyperPAD has provided, line by line:
  130.  
  131.     handler select;
  132.  
  133.     A handler is a portion of an object's script that defines what happens
  134.     when a certain message is received. Each handler statement, like the one
  135.  
  136.  
  137.  
  138.      _______________________________________________________________________
  139.                                          Chapter 2: PADtalk Scripts   16
  140.     ________________________________________________________________________
  141.  
  142.  
  143.     above, names the message the handler responds to (in this case the
  144.     select message) and must end with a semi-colon. The name determines
  145.     which message triggers the execution of this handler.
  146.  
  147.     For more information on messages see Chapter Ten.
  148.  
  149.     begin
  150.     end;
  151.  
  152.     The begin and end statements enclose the list of actions that make up
  153.     this handler. When the select message is received by this button, the
  154.     action statements listed between the begin and end statements will be
  155.     executed.
  156.  
  157.     handler select;
  158.     begin
  159.       [statements executed when the button is selected]
  160.     end;
  161.  
  162.     Each begin statement must have a corresponding end statement in order
  163.     for the handler to be valid. A semi-colon must follow the end statement,
  164.     signifying the end of the handler.
  165.  
  166.     The blank line that HyperPAD has left is for the author to complete. In
  167.     between the begin and end statements, fill in the actions to be taken
  168.     when this button is selected. In this case, we want the user to change
  169.     to the next page. To complete the handler, add the following line:
  170.  
  171.     go to the next page;
  172.  
  173.     HyperPAD does not distinguish between upper and lower case letters - it
  174.     recognizes go to the next page; and Go To The Next Page; as the same
  175.     statement.
  176.  
  177.     Every PADtalk statement within a begin...end block must end with a semi-
  178.     colon. You can incorporate numerous commands to execute by inserting
  179.     them between the begin and end statements. The full handler should
  180.     resemble the following:
  181.  
  182.     handler select;
  183.     begin
  184.       go to the next page;
  185.     end;
  186.  
  187.     We have just created a script with one handler that responds to the
  188.     select message. If the user selects this button (by pressing ENTER or
  189.     with the mouse) the handler will execute, changing to the next page in
  190.     the pad.
  191.  
  192.  
  193.  
  194.      _______________________________________________________________________
  195.                                          Chapter 2: PADtalk Scripts   17
  196.     ________________________________________________________________________
  197.  
  198.  
  199.     Scripts can contain many handlers allowing objects to respond to a
  200.     variety of messages. For example, the following script responds to three
  201.     messages:
  202.  
  203.     handler select;
  204.     begin
  205.       go to the next page;
  206.     end;
  207.  
  208.     handler mouseUp;
  209.     begin
  210.       beep;
  211.     end;
  212.  
  213.     handler mouseEnter;
  214.     begin
  215.       hide the menu bar;
  216.     end;
  217.  
  218.  
  219.     WRITING STATEMENTS IN PADTALK
  220.  
  221.     Each PADtalk statement ends with a semi-colon. A begin...end block, like
  222.     in the Pascal languages, is really a single compound statement (that's
  223.     why there is a semi-colon after the end).
  224.  
  225.     PADtalk is a flexible language. It sometimes provides more than one way
  226.     to perform the same action. For example, the following statements access
  227.     the next page:
  228.  
  229.     go to the next page;
  230.  
  231.     go to next page;
  232.  
  233.     go next page;
  234.  
  235.     go to page (currentPage() + 1);
  236.  
  237.     In many PADtalk statements, like the go statement shown above, you can
  238.     use the word the. The use of this word is optional and has no purpose
  239.     except to enhance readability of your scripts. (The exception is with
  240.     the alternate syntax of function calls.)
  241.  
  242.     You can add comments to your scripts by enclosing them in curly
  243.     brackets. Any text within brackets is ignored by the compiler. The
  244.     following example shows a comment enclosed in brackets.
  245.  
  246.     { this is a comment }
  247.     go to the next page;
  248.  
  249.  
  250.  
  251.      _______________________________________________________________________
  252.                                          Chapter 2: PADtalk Scripts   18
  253.     ________________________________________________________________________
  254.  
  255.  
  256.     Brackets can enclose many lines, shown in the following example:
  257.  
  258.     { this is a comment that
  259.       takes up two lines }
  260.     go to the next page;
  261.  
  262.     You can also enclose comments within other comments. The following
  263.     example comments out a few statements that have comments:
  264.  
  265.     {
  266.     go to the next page;  { change pages }
  267.     beep;                 { emit a sound }
  268.     answer "Find What?";  { ask user question }
  269.     }
  270.  
  271.     You can add a comment to the end of a line by using two consecutive
  272.     hyphens (--). The text between the two hyphens and the end of the line
  273.     is ignored by the compiler. For example:
  274.  
  275.      -- this is a comment
  276.     go to the next page;   -- this is a comment too!
  277.  
  278.     PADtalk is a verbose language that understands over 400 different words.
  279.     Before exploring it, become comfortable within the Script Editor.
  280.  
  281.  
  282.     USING THE KEYBOARD
  283.  
  284.     Press this key:             To:
  285.     ------------------------------------------------------------------------
  286.     UP and DOWN                 Move up or down one line in a script
  287.  
  288.     LEFT and RIGHT              To move left or right on a line in a script
  289.  
  290.     HOME                        Go to the beginning of a line
  291.  
  292.     CTRL+HOME                   Go to the beginning of the script
  293.  
  294.     END                         Go to the end of the line
  295.  
  296.     CTRL+END                    Go to the end of the script
  297.  
  298.     CTRL+RIGHT or CTRL+LEFT     Move forward or backward one word
  299.  
  300.     BACKSPACE                   Delete the previous character
  301.  
  302.     DEL                         Delete the character under the cursor
  303.  
  304.     CTRL+Y or CTRL+D            Delete the current line
  305.  
  306.     CTRL+BACKSPACE              Delete the previous word
  307.  
  308.  
  309.  
  310.      _______________________________________________________________________
  311.                                          Chapter 2: PADtalk Scripts   19
  312.     ________________________________________________________________________
  313.  
  314.  
  315.     Press this key:             To:
  316.     ---------------------------------------------------------
  317.     SHIFT+ARROWS                Select text
  318.  
  319.     ESC or CTRL+Q               Exit with a check to save changes
  320.  
  321.     CTRL+C or CTRL+INS          Copy selected text
  322.  
  323.     TAB                         Inserts space up to next tab stop
  324.  
  325.     PGUP or MINUS (keypad)      Move up one page
  326.  
  327.     PGDN or PLUS (keypad)       Move down one page
  328.  
  329.     CTRL+X or SHIFT+DEL         Cut text
  330.  
  331.     CTRL+V or SHIFT+INS         Paste text
  332.  
  333.     CTRL+DEL                    Delete to the end of the line
  334.  
  335.     CTRL+F                      Find a string
  336.  
  337.     CTRL+R                      Find and replace text
  338.  
  339.     CTRL+N                      Find next occurrence of the string
  340.  
  341.     F4                          Compile the script, checking for errors
  342.  
  343.     F10                         Open the menus
  344.  
  345.  
  346.     EDITING A SCRIPT
  347.  
  348.     In the Script Editor, you can copy and move blocks of text within a
  349.     script or even between scripts.
  350.  
  351.     Before you can using any of the editing features, you have to select the
  352.     text you want to perform the operation on.
  353.  
  354.  
  355.     To select text:
  356.  
  357.     1.  Place the cursor on the first character of the selection.
  358.  
  359.     2.  Hold down SHIFT and use the arrow keys to extend the selection.
  360.  
  361.     3.  When you've highlighted the entire selection, release the keys.
  362.  
  363.     To use the mouse, place the mouse pointer where you want to begin your
  364.     selection. Hold down the left mouse button and drag the mouse until
  365.     you've highlighted the selection. Then, release the mouse button. Once
  366.     the text is selected, you can copy, cut, or delete it.
  367.  
  368.  
  369.  
  370.      _______________________________________________________________________
  371.                                          Chapter 2: PADtalk Scripts   20
  372.     ________________________________________________________________________
  373.  
  374.  
  375.     To copy text:
  376.  
  377.     1.  Select the text.
  378.  
  379.     2.  Select the Copy command from the Edit menu (ALT+E, C).
  380.  
  381.  
  382.     To cut text:
  383.  
  384.     1.  Select the text.
  385.  
  386.     2.  Select the Cut command from the Edit menu (ALT+E, T).
  387.  
  388.  
  389.     To paste text:
  390.  
  391.     1.  Position the cursor where you want to place the text.
  392.  
  393.     2.  Select the Paste command from the Edit menu (ALT+E, P).
  394.  
  395.     The contents of the clipboard will be inserted in the script.
  396.  
  397.  
  398.     SEARCH AND REPLACE
  399.  
  400.     As you become more comfortable with PADtalk, your scripts will become
  401.     longer and more complex. To reduce the amount of time and effort
  402.     necessary to locate text, HyperPAD includes Search and Replace commands.
  403.  
  404.  
  405.     To locate a string in a script:
  406.  
  407.     1.  Select the Find command from the Search menu (ALT+S, F).
  408.  
  409.     The Find dialog box will appear on screen.
  410.  
  411.     2.  Type in the string you want to locate and press ENTER.
  412.  
  413.  
  414.     To locate the next instance of a string:
  415.  
  416.     1.  First complete the above procedure.
  417.  
  418.     2.  Select the Find Next command from the Search menu (ALT+S, N).
  419.  
  420.     To keep looking for that string, continue to select the Find Next
  421.     command. CTRL+N is the shortcut for this command.
  422.  
  423.     Sometimes, you may need to replace a string in a script with another.
  424.     Use the Replace command to locate the instance and replace it with what
  425.     you've specified.
  426.  
  427.  
  428.  
  429.      _______________________________________________________________________
  430.                                          Chapter 2: PADtalk Scripts   21
  431.     ________________________________________________________________________
  432.  
  433.  
  434.     To search and replace within a script:
  435.  
  436.     1.  Select the Replace command from the Search menu.
  437.  
  438.     2.  Enter in the search and replace text, then select:
  439.  
  440.     Verify - Allows you to confirm each replacement.
  441.  
  442.     Replace - Replace the text and continue.
  443.  
  444.     Skip - Continue without replacing the text.
  445.  
  446.     Cancel - Stop the procedure.
  447.  
  448.  
  449.     PRINTING SCRIPTS
  450.  
  451.  
  452.     To print the scripts in your pads:
  453.  
  454.     1.  Select Printer Setup from the File menu and complete the dialog box
  455.     so the options conform to your system. If your printer is not listed,
  456.     select the Generic Printer, or another that your printer can emulate.
  457.  
  458.     2.  Select Page Setup from the File menu and make sure the settings are
  459.     correct.
  460.  
  461.     3.  Select the Print command from the File menu.
  462.  
  463.  
  464.     COMPILING SCRIPTS
  465.  
  466.     Before HyperPAD can use your scripts, they must first be compiled.
  467.     HyperPAD compiles and saves your script when you exit the Script Editor.
  468.  
  469.     As it compiles, HyperPAD scans the script, checking for syntax errors.
  470.     HyperPAD is only able to pass messages to handlers in scripts that have
  471.     been successfully compiled without any errors.
  472.  
  473.     You can manually check for errors before exiting the Script Editor by
  474.     selecting Compile from the Edit menu (or press F4). If there is an
  475.     error, HyperPAD will assist you by positioning the cursor at the
  476.     location of the error and displaying an error message.
  477.  
  478.  
  479.     COMPILING WITH THE DEBUGGING SWITCH
  480.  
  481.     Runtime errors occur when something goes wrong in a script while
  482.     browsing your pad. Normally, HyperPAD will take you to the offending
  483.     script so that you can correct the problem. With larger scripts that
  484.     contain many handlers, it may be difficult to locate the source of a
  485.     runtime error.
  486.  
  487.  
  488.  
  489.      _______________________________________________________________________
  490.                                          Chapter 2: PADtalk Scripts   22
  491.     ________________________________________________________________________
  492.  
  493.  
  494.     To assist you in locating runtime errors, you can turn on the Debug
  495.     option on the Edit menu. When you compile the script with the Debug
  496.     option on, HyperPAD includes line number information with the compiled
  497.     code. Then, following a runtime error, HyperPAD places the cursor
  498.     directly on the line in which the error occurred. If you compile with
  499.     the Debug option off and a runtime error occurs, HyperPAD simply places
  500.     the cursor at the top of the offending script.
  501.  
  502.  
  503.     THE COMPONENTS OF A SCRIPT
  504.  
  505.     A script consists of handlers, which you were introduced to above, and
  506.     functions, which will be introduced in this section.
  507.  
  508.  
  509.     HANDLERS
  510.  
  511.     As you have learned, a handler is a portion of a script that is invoked
  512.     when a specific message is received by the object that contains it. Each
  513.     handler names the message it responds to and includes some action(s) to
  514.     be taken when that message is received.
  515.  
  516.     Here is a more complex handler. It receives two parameters from the
  517.     statement that calls it.
  518.  
  519.     handler calcResult(i,j);
  520.     begin
  521.       put i * j / 100 into the message box;
  522.     end;
  523.  
  524.     Sometimes, you may want a handler to receive a variable number of
  525.     parameters. In this case, it is necessary to know how many parameters
  526.     were passed to your handler and what each of them are. This is
  527.     accomplished using the functions param, paramCount, and params. These
  528.     functions return information about the number of parameters that were
  529.     passed to your handler, the entire parameter list, and what each
  530.     parameter is. The following function sums its parameters and returns the
  531.     total to the calling statement.
  532.  
  533.     function addNums;
  534.     begin
  535.       put 0 into total;
  536.       for i = 1 to the paramCount do
  537.         add param(i) to total;
  538.       return total;
  539.     end;
  540.  
  541.     Notice that this example doesn't declare any parameter variables.
  542.     Instead, it accesses the parameters using the param function.
  543.  
  544.  
  545.  
  546.      _______________________________________________________________________
  547.                                          Chapter 2: PADtalk Scripts   23
  548.     ________________________________________________________________________
  549.  
  550.  
  551.     DEFINING YOUR OWN FUNCTIONS
  552.  
  553.     In addition to handlers, scripts can contain your own functions. A
  554.     function is a group of statements that returns a single value. Functions
  555.     can be called from other handlers in the same script, or from scripts
  556.     higher in the message hierarchy.
  557.  
  558.     For example, the following function asks a question in a dialog box
  559.     using the answer command, then returns the result to the caller using
  560.     the return statement.
  561.  
  562.     function okToContinue;
  563.     begin
  564.       answer "Is it safe";
  565.       return it;
  566.     end;
  567.  
  568.     The return statement defines the number or text value that the function
  569.     will return to the calling statement. The return statement will not stop
  570.     execution of the handler (only exit and pass stop the execution of a
  571.     handler). If you specify more than one return statement, the last return
  572.     statement executed will determine the returned value of the function.
  573.  
  574.     Calling your own functions is just like calling HyperPAD's built-in
  575.     functions. The following statements call the function defined above:
  576.  
  577.     put okToContinue() into res;
  578.     if okToContinue() is "Cancel" then beep;
  579.     put "You selected" & okToContinue();
  580.  
  581.     The open and close parenthesis are used to distinguish a function call
  582.     from a message name. The statement
  583.  
  584.     okToContinue;
  585.  
  586.     is a message name that gets sent to the current script, where as
  587.  
  588.     okToContinue()
  589.  
  590.     calls the user-defined function.
  591.  
  592.  
  593.  
  594.      _______________________________________________________________________
  595.                                          Chapter 2: PADtalk Scripts   24
  596.     ________________________________________________________________________
  597.  
  598.  
  599.     The following example function counts the number of Bs in a passed
  600.     parameter.
  601.  
  602.     function countBs(str);
  603.     begin
  604.       put 0 into total;
  605.       for i = 1 to the length(str) do
  606.         if char i of str is "B" then add 1 to total;
  607.       return total;
  608.     end;
  609.  
  610.     To call this function:
  611.  
  612.     put 5 + countBs("Bobby and Billy when out.");
  613.  
  614.  
  615.     OTHER DEFINITIONS
  616.  
  617.     The following definitions are intended to introduce you to other PADtalk
  618.     components used when writing scripts.
  619.  
  620.  
  621.     COMMANDS
  622.  
  623.     Commands are statements that tell HyperPAD what to do. Each command ends
  624.     with a semi-colon. For example:
  625.  
  626.     go to page 1;
  627.  
  628.     put "wow" into page field 1;
  629.  
  630.     HyperPAD's built-in commands are discussed in Chapter Eleven.
  631.  
  632.  
  633.     CONSTANTS
  634.  
  635.     A constant is any named value that can't be changed. Unlike a variable,
  636.     you can not alter a constant, and unlike a literal, its value is not
  637.     always identical to its name. The following tables summarize HyperPAD's
  638.     constants and their corresponding values.
  639.  
  640.  
  641.  
  642.      _______________________________________________________________________
  643.                                          Chapter 2: PADtalk Scripts   25
  644.     ________________________________________________________________________
  645.  
  646.  
  647.     MISCELLANEOUS CONSTANTS
  648.  
  649.     The miscellaneous constants are:
  650.  
  651.  
  652.     Constant:             Description:
  653.     ----------------------------------------------------
  654.     empty                 Empty String ""
  655.  
  656.     false                 Boolean value false
  657.  
  658.     true                  Boolean value true
  659.  
  660.     pi                    The mathematical constant 3.14159
  661.  
  662.     up                    Returned by ctrlKey(), altKey(), and shiftKey()
  663.  
  664.     down                  Returned by ctrlKey(), altKey(), and shiftKey()
  665.  
  666.  
  667.     CHARACTER CONSTANTS
  668.  
  669.     The character constants are:
  670.  
  671.  
  672.     Constant:             Description:
  673.     ----------------------------------------------------
  674.     formfeed              ASCII 12
  675.  
  676.     linefeed              ASCII 10
  677.  
  678.     quote                 ASCII 34(")
  679.  
  680.     return                ASCII 13
  681.  
  682.     space                 ASCII 32(" ")
  683.  
  684.     tab                   ASCII 9
  685.  
  686.  
  687.  
  688.      _______________________________________________________________________
  689.                                          Chapter 2: PADtalk Scripts   26
  690.     ________________________________________________________________________
  691.  
  692.  
  693.     PROPERTY CONSTANTS
  694.  
  695.     The property constants are:
  696.  
  697.  
  698.     Constant:             Used with this property:
  699.     ----------------------------------------------------
  700.     centered              align
  701.  
  702.     checkBox              style
  703.  
  704.     even                  parity
  705.  
  706.     fat                   cursor
  707.  
  708.     layer                 tabbing
  709.  
  710.     left                  namePosition, align
  711.  
  712.     listBox               style
  713.  
  714.     none                  parity
  715.  
  716.     odd                   parity
  717.  
  718.     off                   cursor, printer, mouse
  719.  
  720.     on                    mouse, printer
  721.  
  722.     opaque                style
  723.  
  724.     position              tabbing
  725.  
  726.     right                 align
  727.  
  728.     scrolling             style
  729.  
  730.     thin                  cursor
  731.  
  732.     top                   nameposition
  733.  
  734.     transparent           style
  735.  
  736.  
  737.     NUMERIC CONSTANTS
  738.  
  739.     The following constants can be used in place of any number to enhance
  740.     readability of your scripts. The numeric constants are:
  741.  
  742.     zero          three        six          nine
  743.     one           four         seven        ten
  744.     two           five         eight
  745.  
  746.  
  747.  
  748.      _______________________________________________________________________
  749.                                          Chapter 2: PADtalk Scripts   27
  750.     ________________________________________________________________________
  751.  
  752.  
  753.     LITERALS
  754.  
  755.     A literal is a number or text string enclosed in quotes. The following
  756.     are literals:
  757.  
  758.     10
  759.     17.39
  760.     "hello"
  761.  
  762.     Special codes can be inserted into quoted text strings for characters
  763.     that you can't easily type with the keyboard. Each code is started with
  764.     the caret (^). The following table shows the supported codes and lists
  765.     some examples:
  766.  
  767.  
  768.     Code:       Value:
  769.     ----------------------------------------------------
  770.     ^^          ^
  771.  
  772.     ^"          "
  773.  
  774.     ^f          formfee (ASCII 12)
  775.  
  776.     ^n          linefeed (ASCII 10)
  777.  
  778.     ^t          tab (ASCII 9)
  779.  
  780.     ^r          carriage return (ASCII 13)
  781.  
  782.     ^d<n>       ASCII character n (where n is the 3 digit character number)
  783.  
  784.     ^x<n>       ASCII character n (where n is the hex character number)
  785.  
  786.     Examples:
  787.  
  788.     "The quick brown ^"fox^" jumped over the lazy dog"
  789.  
  790.     "^rThis is a new line"
  791.  
  792.     "square character ^d254 inserted here"
  793.  
  794.     "hex ^xf4 insert here"
  795.  
  796.  
  797.  
  798.      _______________________________________________________________________
  799.                                          Chapter 2: PADtalk Scripts   28
  800.     ________________________________________________________________________
  801.  
  802.  
  803.     FUNCTIONS
  804.  
  805.     HyperPAD contains many built-in functions, each of which return a single
  806.     value. Some functions require you to pass some parameters. The following
  807.     are a few of HyperPAD's built-in functions:
  808.  
  809.     min(10,12)
  810.  
  811.     time()
  812.  
  813.     files("*.DOC")
  814.  
  815.     HyperPAD's functions are discussed in Chapter Thirteen.
  816.  
  817.  
  818.     PROPERTIES
  819.  
  820.     Properties are values that control how objects look and behave. All
  821.     objects of the same type have the same properties, but each object has
  822.     its own values for these properties. Color, for example, is a property
  823.     of buttons. All buttons have the color property and all buttons may be a
  824.     different color. The following are properties:
  825.  
  826.     lockText
  827.  
  828.     insertPoint
  829.  
  830.     hilite
  831.  
  832.     Object properties are discussed in Chapter Twelve.
  833.  
  834.  
  835.     CONTAINERS
  836.  
  837.     A container is a storage place for a value. The following are
  838.     containers:
  839.  
  840.     fields
  841.  
  842.     variables
  843.  
  844.     the message box
  845.  
  846.     selectedText
  847.  
  848.     Containers are discussed in Chapter Four.
  849.